<cd-modal [modalRef]="activeModal">
  <ng-container i18n="form title"
                class="modal-title">Delete Zone</ng-container>

  <ng-container class="modal-content">
    <form name="zoneForm"
          [formGroup]="zoneForm"
          novalidate>
      <div class="custom-control ms-4 mt-4">
        <label i18n>
            Do you want to delete all pools associated with it?</label>
        <label class="mb-4"
               i18n>
            This will delete the following pools and any data stored in these pools:</label>
        <ng-container *ngIf="zoneData$ | async as data">
          <div id="scroll">
            <ng-container *ngFor="let pool of data.placement_pools">
              <strong>{{pool?.val.data_extra_pool}}</strong>
              <strong>{{pool?.val.index_pool}}</strong>
              <strong>{{pool?.val.storage_classes.STANDARD.data_pool}}</strong>
            </ng-container>
          </div>
        </ng-container>
        <div class="form-group">
          <div class="custom-control custom-checkbox mt-2">
            <input type="checkbox"
                   class="custom-control-input"
                   name="deletePools"
                   id="deletePools"
                   formControlName="deletePools"
                   (change)="showDangerText()">
            <label class="custom-control-label"
                   for="deletePools"
                   i18n>Yes, I want to delete the pools.</label>
          </div>
          <div *ngIf="displayText"
               class="me-4">
            <cd-alert-panel type="danger"
                            i18n>
                            This will delete all the data in the pools!
            </cd-alert-panel>
          </div>
        </div>
      </div>

      <div class="modal-footer">
        <cd-form-button-panel (submitActionEvent)="submit()"
                              [form]="zoneForm"
                              [submitText]="actionLabels.DELETE">
        </cd-form-button-panel>
      </div>
    </form>
  </ng-container>

</cd-modal>
